package com.xteam.ecsystem.service.admin;

import net.sf.json.JSONObject;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xteam.ecsystem.dao.IOrderLogDao;
import com.xteam.ecsystem.utils.PageCenterStation;

/**
 * 订单日志信息业务处理类
 */
@Service
public class OrderLogService {
	
	@Autowired
	public IOrderLogDao orderLogDao;
	
	/**
	 * 根据订单编号获得订单日志信息
	 * @author liuzhi
	 * @param orderId
	 * @return
	 */
	public String getLolListByOrderId(String orderId){
		return this.orderLogDao.getLolListByOrderId(orderId);
	}
	
	/**
	 * 条件查询并分页显示订单日志信息记录
	 * @author liuzhi
	 * @param boiOsn
	 * @param lolUser
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public String getOrderLogList(String boiOsn, String lolUser, int pageIndex, int pageSize){
		return this.orderLogDao.getOrderLogList(boiOsn, lolUser, pageIndex, pageSize);
	}
	
	/**
	 * 
	 * 清除单条或多条订单日志信息
	 * @author liuzhi
	 * @param ids
	 */
	public void delOrderLogsByIds(String ids){
		this.orderLogDao.delOrderLogsByIds(ids);
	}

	public String findOrderLogList(int pageIndex, int pageSize, String boiId) {
		PageCenterStation<?> p = orderLogDao.findOrderLogList(pageIndex, pageSize,
				boiId);
		JSONObject jo = JSONObject.fromObject(p);
		return jo.toString();

	}

}
